/**
 * Created by hehe on 2015/7/22.
 */
function BaseAction(){

}

BaseAction.prototype.formattedResult = function(success,result){
    var obj = new Object();
    if(success){
        obj.status = 200;
        if(result instanceof Array){
            obj.recordset = result;
        }else{
            obj.record = result;
        }
    }else{
        obj.status = 500;
        obj.exception = result;
    }
    return JSON.stringify(obj);
}

exports.BaseAction = BaseAction;
